﻿
/******************** MESSAGES AREA *************************/
function GetInvalidFormat(fieldName) {
    return (fieldName + ' không hợp lệ');
}
function GetRequiredFormat(fieldName) {
    return (fieldName + ' là bắt buộc');
}

var MSG_INVALID_CHAR = 'This field cannot contain special characters';

/********************* PARAMS AREA **************************/
var PARAM_EMAIL = '^([\\w-]+(?:\\.[\\w-]+)*)@((?:[\\w-]+\\.)*\\w[\\w-]{0,66})\\.([a-z]{2,6}(?:\\.[a-z]{2})?)$';
//var PARAM_NAME = '^([a-zA-Z0-9\\s]+)*$';
var PARAM_NAME = '^([a-zA-Z\\s]+)*$'
var PARAM_AREA_CODE = '^([2-9]\\d{2})$';
var PARAM_PHONE = '^(?:\\([2-9]\\d{2}\\)\\ ?|[2-9]\\d{2}(?:\\-?|\\ ?))[2-9]\\d{2}[- ]?\\d{4}$';
var PARAM_PHONE_EXT = '^([0-9. ()-]*)$';
var PARAM_PASSWORD = '^\s*([0-9a-zA-Z]+)\s*$';

var PARAM_INBOUND_PHONE = '^(\\([2-9]\\d{2}\\))';      //(201) 345-4255